var si = require('systeminformation');
var utils = require("./utils");

si.fsSize(function (data) {
    console.log(data);
});

setInterval(() => {
    console.log("==========");
    si.fsSize(function (data) {
        var disk = data[0];//C盘
        var label = utils.humanFileSize(disk.used, true) +
            ' of ' +
            utils.humanFileSize(disk.size, true);

        console.log("percent:"+ disk.use / 100+"  label:"+label);
    });
}, 1000);